//#define _CRT_SECURE_NO_WARNINGS 1
//#include <iostream>
//using namespace std;
//
//int main()
//{
//
//	return 0;
//}
int findMaxConsecutiveOnes(int* nums, int numsSize) {

    int pos_zero[10000] = { 0 };
    int count = 0;
    for (int i = 0; i < numsSize; i++)
    {
        if (nums[i] == 0)
        {
            pos_zero[count++] = i;
        }
    }
    pos_zero[count] = numsSize;

    int max = pos_zero[0];
    for (int i = 0; i <= count; i++)
    {
        int ret = pos_zero[i + 1] - pos_zero[i] - 1;
        if (max < ret)
            max = ret;
    }

    return max;
}